﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="SV_EmpCardId.aspx.cs" Inherits="WorkTime_SV_EmpCardId" %>
<%@ Register Src="../Control/DepartmentDList.ascx" TagName="DepartmentDList" TagPrefix="uc2" %>
<%@ Register Src="../Control/SelUser.ascx" TagName="SelUser" TagPrefix="uc1" %>
<%@ Register Assembly="ZLTextBox" Namespace="BaseText" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Titile" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <infolight:webdatasource id="Master" runat="server" autoapply="True" webdatasetid="WMaster"
        allowadd="True" allowdelete="True" allowprint="True" allowupdate="True" alwaysclose="False"
        autoapplyforinsert="False" autorecordlock="False" autorecordlockmode="NoneReload"
        cachedataset="True" commandname="" commandtext="" datamember="WorkTime_SV_EmpCardId"
        eof="True" keyvalues="" lastindex="-1" marker="'" masterdatasource="" packetrecords="100"
        quoteprefix="[" quotesuffix="]" remotename="" selectcommand="" 
        tablename="" onapplyerror="Master_ApplyError">
    </infolight:webdatasource>
    <infolight:webdatasource id="wdsWorkTime_SV_EmpCardIdEmployeeId" runat="server" selectalias="Usasdb"
        selectcommand="SELECT Employees.EmployeeID, Employees.EmpName, 
      Department.DepartmentName
FROM Employees INNER JOIN
      Department ON 
      Employees.DepartmentId = Department.DepartmentId
WHERE (Employees.EmpStatus = 1)" cachedataset="True">
    </infolight:webdatasource>
    <infolight:webdefault id="wdWorkTime_SV_EmpCardId" runat="server" datamember="WorkTime_SV_EmpCardId"
        datasourceid="Master">
        <fields>
    <InfoLight:DefaultFieldItem DefaultValue="0" FieldName="Id" />
      <InfoLight:DefaultFieldItem FieldName="CardType" DefaultValue="0" />
   </fields>
    </infolight:webdefault>
    <infolight:webvalidate id="wvWorkTime_SV_EmpCardId" runat="server" datamember="WorkTime_SV_EmpCardId"
        datasourceid="Master" duplicatecheck="False" duplicatecheckmode="ByLocal" forecolor="Red"
        validatechar="*" validatecolor="Red" validatestyle="ShowLable">
        <fields>
<InfoLight:ValidateFieldItem FieldName="CardId" CheckNull="True"></InfoLight:ValidateFieldItem>
   </fields>
    </infolight:webvalidate>
    <infolight:webnavigator id="WebNavigator1" runat="server" bindingobject="wgvMaster"
        width="100%" statusstrip="WebStatusStrip1" showdatastyle="GridStyle" 
        CssClass="NavigatorBar" CtlHeight="25">
        <navcontrols>
                <InfoLight:ControlItem ControlName="Add" ControlText="穝糤" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/add_C.gif" MouseOverImageUrl="../image/uipics/add2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/add3_C.gif" />
                <InfoLight:ControlItem ControlName="Apply" ControlText="郎" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/apply_C.gif" MouseOverImageUrl="../image/uipics/apply2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/apply3_C.gif" />
                <InfoLight:ControlItem ControlName="Abort" ControlText="斌" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/abort_C.gif" MouseOverImageUrl="../image/uipics/abort2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/abort3_C.gif" />
                <InfoLight:ControlItem ControlName="Query" ControlText="琩高" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/query_C.gif" MouseOverImageUrl="../image/uipics/query2_C.gif"
                    Size="48" DisenableImageUrl="../image/uipics/query3_C.gif" />
                <InfoLight:ControlItem ControlName="Export" ControlType="Image" ControlVisible="True"
                    DisenableImageUrl="../Image/UIPics/Export3_C.gif" ImageUrl="../Image/UIPics/Export_C.gif"
                    MouseOverImageUrl="../Image/UIPics/Export2_C.gif" Size="48" />
            </navcontrols>
        <navstates>
                <InfoLight:WebNavigatorStateItem StateText="Initial" />
                <InfoLight:WebNavigatorStateItem StateText="Browsed" />
                <InfoLight:WebNavigatorStateItem StateText="Inserting" />
                <InfoLight:WebNavigatorStateItem StateText="Editing" />
                <InfoLight:WebNavigatorStateItem StateText="Applying" />
                <InfoLight:WebNavigatorStateItem StateText="Changing" />
                <InfoLight:WebNavigatorStateItem StateText="Querying" />
                <InfoLight:WebNavigatorStateItem StateText="Printing" />
            </navstates>
    </infolight:webnavigator>
     <table cellpadding="0" cellspacing="5" class="TbSearch">
        <tr>
            <td style="width: 80px;" align="right">
              门禁卡号:
            </td>
            <td style="width: 79px;">
                <asp:TextBox ID="txtCardId" runat="server"></asp:TextBox>
            </td>
            <td style="width: 40px;" align="right">
                <asp:Label ID="Label3" runat="server" Text="员工:"></asp:Label>
            </td>
            <td style="width: 79px;">
                <uc1:seluser ID="SelUser" runat="server" />
            </td>
            <td style="width: 40px;" align="right">
                <asp:Label ID="LLabel3" runat="server" Text="部门:" Width="35px"></asp:Label>
            </td>
            <td align="center" style="width: 46px;">
                <uc2:departmentdlist ID="DepartmentDList1" runat="server" />
            </td>
            <td align="center" style="width: 200px;">
                <span class="roundbtn">
                    <asp:LinkButton ID="Refresh" runat="server" Text=" 筛 选 " OnClick="Refresh_Click"></asp:LinkButton>
                </span>
            </td>
        </tr>
    </table>
    <infolight:webgridview id="wgvMaster" runat="server" cellpadding="5" datasourceid="Master"
        forecolor="#333333" width="100%" aborticonurl="../Image/UIPics/Abort.gif" addiconurl="../Image/UIPics/Add.gif"
        applyiconurl="../Image/UIPics/Apply.gif" canceliconurl="../Image/UIPics/Cancel.gif"
        mouseoveraborticonurl="../Image/UIPics/Abort2.gif" mouseoveraddiconurl="../Image/UIPics/Add2.gif"
        mouseoverapplyiconurl="../Image/UIPics/Apply2.gif" mouseovercanceliconurl="../Image/UIPics/Cancel2.gif"
        mouseoverokiconurl="../Image/UIPics/OK2.gif" mouseoverqueryiconurl="../Image/UIPics/Query2.gif"
        okiconurl="../Image/UIPics/OK.gif" 
        queryiconurl="../Image/UIPics/Query.gif" headerstylewrap="False"
        backcolor="White" bordercolor="White" borderstyle="Groove" borderwidth="2px"
        datamember="WorkTime_SV_EmpCardId" PageSize="15" AllowSorting="True">
        <pagersettings mode="NumericFirstLast" />
        <footerstyle backcolor="#507CD1" forecolor="White" font-bold="True"></footerstyle>
        <navcontrols>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/add2.gif" ControlText="add" ControlName="Add" ControlType="Image" ImageUrl="../image/uipics/add.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/ok2.gif" ControlText="Insert" ControlName="OK" ControlType="Image" ImageUrl="../image/uipics/ok.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/cancel2.gif" ControlText="cancel" ControlName="Cancel" ControlType="Image" ImageUrl="../image/uipics/cancel.gif"></InfoLight:ControlItem>
</navcontrols>
        <columns>
<asp:TemplateField ShowHeader="False"><EditItemTemplate>
<asp:ImageButton id="ImageButton1" runat="server" Text="Update" CausesValidation="True" ImageUrl="~/Image/UIPics/OK.gif" CommandName="Update" __designer:wfdid="w3"></asp:ImageButton>&nbsp;<asp:ImageButton id="ImageButton2" runat="server" Text="Cancel" CausesValidation="False" ImageUrl="~/Image/UIPics/Cancel.gif" CommandName="Cancel" __designer:wfdid="w4"></asp:ImageButton>
</EditItemTemplate>
    <headerstyle wrap="False" />
<ItemTemplate>
<asp:ImageButton id="ImageButton3" runat="server" Text="Edit" CausesValidation="False" ImageUrl="~/Image/UIPics/Edit.gif" CommandName="Edit" __designer:wfdid="w1"></asp:ImageButton>&nbsp;<asp:ImageButton id="ImageButton4" runat="server" Text="Delete" CausesValidation="False" ImageUrl="~/Image/UIPics/Delete.gif" CommandName="Delete" __designer:wfdid="w2"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
                <asp:BoundField DataField="Id" HeaderText="编号" SortExpression="Id" ReadOnly="True" />
                <asp:TemplateField HeaderText="员工工号" SortExpression="EmployeeId">
                    <edititemtemplate>
<InfoLight:WebRefVal runat="server" ReadOnly="False" DataBindingField="EmployeeId" MultiLanguage="False" ResxFilePath="" BindingText="" DataSourceID="wdsWorkTime_SV_EmpCardIdEmployeeId" ButtonImageUrl="../Image/refval/RefVal.gif" Width="130px" DataValueField="EmployeeID" UpdatePanelID="" ResxDataSet="" ID="wrvWorkTime_SV_EmpCardIdEmployeeIdE" BindingValue='<%# Bind("EmployeeId") %>' UseButtonImage="True" PostBackButonClick="False" AllowAddData="False" DataTextField="EmpName"><Columns>
<InfoLight:WebRefColumn HeadText="所在部门" ColumnName="DepartmentName" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工编号" ColumnName="EmployeeID" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工姓名" ColumnName="EmpName" Width="100"></InfoLight:WebRefColumn>
</Columns>
</InfoLight:WebRefVal>
</edititemtemplate>
                    <footertemplate>
<InfoLight:WebRefVal runat="server" ReadOnly="False" DataBindingField="EmployeeId" MultiLanguage="False" ResxFilePath="" BindingText="" DataSourceID="wdsWorkTime_SV_EmpCardIdEmployeeId" ButtonImageUrl="../Image/refval/RefVal.gif" Width="130px" DataValueField="EmployeeID" UpdatePanelID="" ResxDataSet="" ID="wrvWorkTime_SV_EmpCardIdEmployeeIdF" BindingValue='<%# Bind("EmployeeId") %>' UseButtonImage="True" PostBackButonClick="False" AllowAddData="False" DataTextField="EmpName"><Columns>
<InfoLight:WebRefColumn HeadText="所在部门" ColumnName="DepartmentName" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工编号" ColumnName="EmployeeID" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工姓名" ColumnName="EmpName" Width="100"></InfoLight:WebRefColumn>
</Columns>
</InfoLight:WebRefVal>
</footertemplate>
                    <itemtemplate>
<InfoLight:WebRefVal runat="server" ReadOnly="True" DataBindingField="EmployeeId" MultiLanguage="False" ResxFilePath="" BindingText="" DataSourceID="wdsWorkTime_SV_EmpCardIdEmployeeId" ButtonImageUrl="../Image/refval/RefVal.gif" BorderStyle="None" Width="130px" DataValueField="EmployeeID" BackColor="Transparent" UpdatePanelID="" ResxDataSet="" ID="wrvWorkTime_SV_EmpCardIdEmployeeId" BindingValue='<%# Bind("EmployeeId") %>' UseButtonImage="True" PostBackButonClick="False" AllowAddData="False" DataTextField="EmpName"><Columns>
<InfoLight:WebRefColumn HeadText="所在部门" ColumnName="DepartmentName" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工编号" ColumnName="EmployeeID" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工姓名" ColumnName="EmpName" Width="100"></InfoLight:WebRefColumn>
</Columns>
</InfoLight:WebRefVal>
</itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="门禁卡号" SortExpression="CardId">
                    <edititemtemplate>
<cc1:ZLTextBox id="CardId" language="English" runat="server" Width="64px" Text='<%# Bind("CardId") %>' __designer:wfdid="w269" IsDisplayTime="True" ShowMessage FloatLength="2" onfocusCssName textValue onblurCssName InputType="number" MaxLength="4"></cc1:ZLTextBox>
</edititemtemplate>
                    <footertemplate>
<cc1:ZLTextBox id="CardId" language="English" runat="server" Width="64px" Text='<%# Bind("CardId") %>' __designer:wfdid="w270" IsDisplayTime="True" ShowMessage FloatLength="2" onfocusCssName textValue onblurCssName InputType="number" MaxLength="4"></cc1:ZLTextBox>
</footertemplate>
                    <itemtemplate>
<asp:Label id="Label1" runat="server" Text='<%# Bind("CardId") %>' __designer:wfdid="w267"></asp:Label> 
</itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="卡的分类" SortExpression="CardType">
                    <edititemtemplate>
<InfoLight:WebDropDownList id="DDCardType" runat="server" __designer:wfdid="w258" SelectedValue='<%# Bind("CardType") %>' AutoInsertEmptyData="False" Filter FilterObject OnlyShowSelectText="False" DriverObject><asp:ListItem Selected="True" Value="0">总部</asp:ListItem>
<asp:ListItem Value="1">工厂</asp:ListItem>
</InfoLight:WebDropDownList>
</edititemtemplate>
                    <footertemplate>
<InfoLight:WebDropDownList id="DDCardType" runat="server" __designer:wfdid="w259" SelectedValue='<%# Bind("CardType") %>' AutoInsertEmptyData="False" Filter FilterObject OnlyShowSelectText="False" DriverObject><asp:ListItem Selected="True" Value="0">总部</asp:ListItem>
<asp:ListItem Value="1">工厂</asp:ListItem>
</InfoLight:WebDropDownList>
</footertemplate>
                    <itemtemplate>
<InfoLight:WebDropDownList id="DDCardType" runat="server" __designer:wfdid="w260" Enabled="False" SelectedValue='<%# Bind("CardType") %>' AutoInsertEmptyData="False" Filter FilterObject OnlyShowSelectText="True" DriverObject><asp:ListItem Selected="True" Value="0">总部</asp:ListItem>
<asp:ListItem Value="1">工厂</asp:ListItem>
</InfoLight:WebDropDownList>
</itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="门禁卡未使用" SortExpression="NoUse">
                    <edititemtemplate>
<asp:CheckBox id="wdtpWorkTime_SV_EmpCardIdNoUseE" runat="server"  ToolTip="NoUse" __designer:wfdid="w254" Checked='<%# Bind("NoUse") %>'></asp:CheckBox> 
</edititemtemplate>
                    <footertemplate>
<asp:CheckBox id="wdtpWorkTime_SV_EmpCardIdNoUseF" runat="server"  ToolTip="NoUse" __designer:wfdid="w266" Checked='<%# Bind("NoUse") %>' ></asp:CheckBox> 
</footertemplate>
                    <itemtemplate>
<asp:CheckBox id="wdtpWorkTime_SV_EmpCardIdNoUseF" runat="server"  ToolTip="NoUse" __designer:wfdid="w253" Enabled="False" Checked='<%# Bind("NoUse") %>'></asp:CheckBox> 
</itemtemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="DepartmentName" HeaderText="部门名称" SortExpression="DepartmentName" ReadOnly="True" />
                
</columns>
        <rowstyle backcolor="#EFF3FB"></rowstyle>
        <editrowstyle backcolor="#2461BF"></editrowstyle>
        <selectedrowstyle backcolor="#D1DDF1" forecolor="#333333" font-bold="True"></selectedrowstyle>
        <pagerstyle backcolor="LightBlue" forecolor="White" horizontalalign="Center"></pagerstyle>
        <headerstyle backcolor="DeepSkyBlue" forecolor="White" font-bold="True"></headerstyle>
        <alternatingrowstyle backcolor="White" bordercolor="White"></alternatingrowstyle>
        <addnewrowcontrols>
                <InfoLight:AddNewRowControlItem ControlID="wrvWorkTime_SV_EmpCardIdEmployeeIdF" ControlType="RefVal"
                    FieldName="EmployeeId" />
                <InfoLight:AddNewRowControlItem ControlID="DDCardType" ControlType="DropDownList"
                    FieldName="CardType" />
                <InfoLight:AddNewRowControlItem ControlID="wdtpWorkTime_SV_EmpCardIdNoUseF" ControlType="CheckBox"
                    FieldName="NoUse" />
                <InfoLight:AddNewRowControlItem ControlID="CardId" ControlType="TextBox" FieldName="CardId" />
            </addnewrowcontrols>
    </infolight:webgridview>
</asp:Content>
